import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import axios from "axios";
import ElementUI from 'element-ui';
import indexApi from "./api/index";
import contractApi from "./api/contract";
import batchApi from "./api/batch";
import projectApi from "./api/project";
import knowledgeApi from "./api/knowledge";
import 'element-ui/lib/theme-chalk/index.css';


Vue.config.productionTip = false
Vue.prototype.$axios = axios
Vue.prototype.$indexApi = indexApi
Vue.prototype.$contractApi = contractApi
Vue.prototype.$batchApi = batchApi
Vue.prototype.$projectApi = projectApi
Vue.prototype.$knowledgeApi = knowledgeApi
Vue.use(ElementUI);
import * as echarts from 'echarts';
Vue.prototype.$echarts = echarts;
axios.defaults.baseURL = 'http://47.100.30.12:8080'
// axios.defaults.baseURL = 'http://localhost:8080'
axios.interceptors.request.use(config => {
  if (config.push == '/') {
    console.log('');
  } else {
    if (sessionStorage.getItem('token')) {
      config.headers.token = sessionStorage.getItem('token');
    }
  }
  return config;
}, error => {
  return Promise.reject(error);
});
new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')


// require styles 导入富文本编辑器对应的样式
import 'quill/dist/quill.core.css'
import 'quill/dist/quill.snow.css'
import 'quill/dist/quill.bubble.css'


